package cn.study.luckyapp.mq.product;

import lombok.AllArgsConstructor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

@Component
@AllArgsConstructor
public class ActivityDrawMessageProducer {
    private final RabbitTemplate rabbitTemplate;
    public void  sendMessage(){
        String msg="hello world";
        rabbitTemplate.convertAndSend("exchange2","deduction",msg);
    }
}
